package test.ws.callcenter.action;

import java.util.Map;

import javax.faces.component.UIParameter;
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
import javax.faces.event.ActionListener;

public class ModifyCustomerContactInfoActiion implements ActionListener {

	@Override
	public void processAction(ActionEvent event) throws AbortProcessingException {
		/*
		 * Get the session map of the external context
		 */
		Map session = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();

		Object object = session.get("customerCode");
		Object object2 = session.get("phoneNo");
		Object object3 = session.get("mobileNo");
		/* 
		 * Find the UIParameter component by expression
		 */
		UIParameter customerCodeUI = (UIParameter) event.getComponent().findComponent("customerCode");
		UIParameter phoneNoUI = (UIParameter) event.getComponent().findComponent("phoneNo");
		UIParameter mobileNoUI = (UIParameter) event.getComponent().findComponent("mobileNo");

		/*
		 * parse the value of the UIParameter component
		 */
		String customerCode = customerCodeUI.getValue().toString();
		String phoneNo = phoneNoUI.getValue().toString();
		String mobileNo = mobileNoUI.getValue().toString();
	}

}
